package com.itheima.homework.homework1;


import java.util.ArrayList;

/**
 *
 * 测试类
 */
public class Test {
    public static void main(String[] args) {

        //
        ArrayList<Employee> employeelist = new ArrayList<>();

        Employee employee1= new Employee("张小强", "M001", "销售部") {
            @Override
            public void showMsg(ArrayList<Employee> employees) {

            }
        };
        Employee employee2= new Employee("李小亮", "C001", "销售部") {
            @Override
            public void showMsg(ArrayList<Employee> employees) {

            }
        };
        employeelist.add(employee1);
        employeelist.add(employee2);

        /**
         * 多态
         */
//        Employee manager = new Manager();
//        manager.showMsg(employeelist);


        Employee clerk = new Clerk();
        clerk.showMsg(employeelist);

    }

}
